package com.sale.goods.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.goods.api.dto.ImparityGoodsDto;
import com.sale.goods.api.vo.GetDataByCodeGoodsVo;
import com.sale.goods.domain.GoodsCancel;
import com.sale.goods.domain.GoodsDisburse;
import com.sale.goods.domain.dto.GoodsDisburseDto;
import com.sale.goods.domain.dto.ReceiptAndPaymentDocDto;
import com.sale.goods.domain.vo.GoodsDisburseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 其他支出单
 * @Date 23-08-08
 * @Author hl
 **/
public interface GoodsDisburseMapper extends BaseMapperPlus<GoodsDisburseMapper, GoodsDisburse, GoodsDisburse> {

    /**
     * 分页查询其他支出单
     * @param build,buildQueryWrapper
     * @return   List<GoodsDisburseDto>
     */
    Page<GoodsDisburseDto> selectDisburseList(@Param("page") Page<GoodsDisburseVo> build,@Param(Constants.WRAPPER) Wrapper<GoodsDisburseVo> buildQueryWrapper);


    /**
     * 获取其他支出单 (弹框)
     */
    Page<ReceiptAndPaymentDocDto> selectDisbursePopList(@Param("page") Page<GoodsDisburseVo> build,@Param(Constants.WRAPPER) Wrapper<GoodsDisburseVo> buildQueryWrapper);

    /**
     * 财务-核销单 通过获取未全部核销的其他支出单数据
     */
    List<ImparityGoodsDto> getNoVerificationList(@Param("getDataByCodeVo") GetDataByCodeGoodsVo getDataByCodeVo);


    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsDisburseDto> getQClosingDocument(String time);

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsDisburseDto> getRClosingDocument(String time);

    /**
     * 更新核销金额
     */
    void updateDisburseCancel(GoodsCancel cancel);
}
